Component({
  properties: {
    num:{
      type:String,
      value:'-1'
    },
    city:{
      type:String,
      value:'城市'
    }
  },
  data: {

    num: -1
  },

  methods: {
    navTab (e) {
      var index = e.currentTarget.dataset.type
      console.log(index)
      if (index ==3) {
        wx.redirectTo({
          url: '/pages/city/city',
        })
      } else if (index==1) {
        wx.redirectTo({
          url: '/pages/weekActivityClass/weekActivityClass'
        })
      } else if (index ==2) {
        wx.redirectTo({
          url: '/pages/recommend/recommend'
        })
      }else if (index ==0) {
        wx.switchTab({
          url: '/pages/index/index'
        })
      }
      this.setData({
        num:index
      })
    }
  }
})